package com.tramy.cn.push.common;

public class Data {

    private String title;

    private String content;

    private String channelId;

    private Boolean grantMi;

    private Boolean grantHms;

    private Integer level;

    private String token;

    private Data(Builder builder) {
        this.title = builder.title;
        this.content = builder.content;
        this.channelId = builder.channelId;
        this.grantMi = builder.grantMi;
        this.grantHms = builder.grantHms;
        this.level = builder.level;
        this.token = builder.token;
    }

    public String getTitle() {
        return title;
    }

    public String getContent() {
        return content;
    }

    public String getChannelId() {
        return channelId;
    }

    public Boolean getGrantMi() {
        return grantMi;
    }

    public Boolean getGrantHms() {
        return grantHms;
    }

    public Integer getLevel() {
        return level;
    }

    public String getToken() {
        return token;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private String title;
        private String content;
        private String channelId;
        private Boolean grantMi;
        private Boolean grantHms;
        private Integer level;
        private String token;

        private Builder() {
            grantMi = false;
            grantHms = false;

            level = LEVEL.LOW;
        }

        public Builder setTitle(String title) {
            this.title = title;
            return this;
        }

        public Builder setContent(String content) {
            this.content = content;
            return this;
        }

        public Builder setChannelId(String channelId) {
            this.channelId = channelId;
            return this;
        }

        public Builder setGrantMi(Boolean grantMi) {
            this.grantMi = grantMi;
            return this;
        }

        public Builder setGrantHms(Boolean grantHms) {
            this.grantHms = grantHms;
            return this;
        }

        public Builder setLevel(Integer level) {
            this.level = level;
            return this;
        }

        public Builder setToken(String token) {
            this.token = token;
            return this;
        }

        public Data build() {
            return new Data(this);
        }
    }

}
